/**
 * 
 */
package com.ffcs.crmd.tsp.api.dto.job;

import java.io.Serializable;

import com.ffcs.crmd.tsp.api.dto.task.TspJobExecutionException;
import com.ffcs.crmd.tsp.api.task.job.IJobExecutionContext;
import com.thoughtworks.xstream.annotations.XStreamAliasType;

/**
 * 功能说明: 子任务运行内核通信体
 *
 * @author ZHONGFUHUA
 * 
 * @since 2.0.0-SNAPSHOT
 *
 */
@XStreamAliasType("TspJobDetailShell")
public class TspJobDetailShell implements Serializable {
    
    /**
     * 
     */
    private static final long              serialVersionUID         = 4692158301744524209L;
    
    /**
     * 
     */
    private String                         id;
    
    /**
     * 优先级
     */
    private int                            priority;
    
    /**
     * 
     */
    private boolean                        finish;
    
    /**
     * 子任务执行上下文
     */
    private TspJobExecutionContext<Object> context;
    
    /**
     * 
     */
    private TspJobExecutionException       tspJobExecutionException = null;
    
    /**
     * 功能说明: 获取
     *
     * @return id 
     */
    public String getId() {
        return id;
    }
    
    /**
     * 功能说明: 设置
     *
     * @param id 
     */
    public void setId(String id) {
        this.id = id;
    }
    
    /**
     * 功能说明: 获取子任务执行上下文
     *
     * @return context 子任务执行上下文
     */
    public IJobExecutionContext<Object> getContext() {
        return context;
    }
    
    /**
     * 功能说明: 设置子任务执行上下文
     *
     * @param context 子任务执行上下文
     */
    public void setContext(IJobExecutionContext<Object> context) {
        this.context = (TspJobExecutionContext<Object>) context;
    }
    
    /**
     * 功能说明: 获取
     *
     * @return tspJobExecutionException 
     */
    public TspJobExecutionException getTspJobExecutionException() {
        return tspJobExecutionException;
    }
    
    /**
     * 功能说明: 设置
     *
     * @param tspJobExecutionException 
     */
    public void setTspJobExecutionException(TspJobExecutionException tspJobExecutionException) {
        this.tspJobExecutionException = tspJobExecutionException;
    }
    
    /**
     * 功能说明: 获取优先级
     *
     * @return priority 优先级
     */
    public int getPriority() {
        return priority;
    }
    
    /**
     * 功能说明: 设置优先级
     *
     * @param priority 优先级
     */
    public void setPriority(int priority) {
        this.priority = priority;
    }
    
    /**
     * 功能说明: 获取
     *
     * @return finish 
     */
    public boolean isFinish() {
        return finish;
    }
    
    /**
     * 功能说明: 设置
     *
     * @param finish  
     */
    public void setFinish(boolean finish) {
        this.finish = finish;
    }
    
}
